/*
 * Copyright (c) 2021 az13js
 * meson_gtk is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of
 * the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF
 * ANY KIND,EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

/*
 * GTK应用程序。用来在本地测试GTK的一些功能，除此之外，没有什么其它的用途了。
 */
#include "meson_gtk.h"
#include <gtk/gtk.h>

/*
 * 使用硬编码的应用标识创建GTK应用，绑定一个激活回调函数然后运行。
 */
int main(int argc, char *argv[]) {
    GtkApplication *app;
    int status;
    app = gtk_application_new("cn.test.app", G_APPLICATION_FLAGS_NONE);
    g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
    status = g_application_run(G_APPLICATION(app), argc, argv);
    g_object_unref(app);
    return status;
}
